home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 1 / QRZ Ham Radio Callsign Database - December 1993.iso / ucsd / packet / tcpip / sys5 / iscwmpst.z / iscwmpst / tcp / src / internet.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-17  |  1.8 KB  |  68 lines

  1. /* @(#) $Header: internet.h,v 1.5 91/07/16 17:55:19 deyke Exp $ */
  2.  
  3. #ifndef _INTERNET_H
  4. #define _INTERNET_H
  5.  
  6. #ifndef _GLOBAL_H
  7. #include "global.h"
  8. #endif
  9.  
  10. /* Global structures and constants pertaining to the interface between IP and
  11.  *      higher level protocols
  12.  */
  13.  
  14. /* IP protocol field values */
  15. #define ICMP_PTCL       1       /* Internet Control Message Protocol */
  16. #define TCP_PTCL        6       /* Transmission Control Protocol */
  17. #define UDP_PTCL        17      /* User Datagram Protocol */
  18. #define AX25_PTCL       93      /* AX.25 inside IP according to RFC-1226 */
  19. #define IP_PTCL         94      /* IP inside IP */
  20.  
  21. #define MAXTTL          255     /* Maximum possible IP time-to-live value */
  22.  
  23. /* DoD-style precedences */
  24. #define ROUTINE         0x00
  25. #define PRIORITY        0x20
  26. #define IMMEDIATE       0x40
  27. #define FLASH           0x60
  28. #define FLASH_OVER      0x80
  29. #define CRITIC          0xa0
  30. #define INET_CTL        0xc0
  31. #define NET_CTL         0xe0
  32.  
  33. /* Amateur-style precedences */
  34. #define AM_ROUTINE      0x00
  35. #define AM_WELFARE      0x20
  36. #define AM_PRIORITY     0x40
  37. #define AM_EMERGENCY    0x60
  38.  
  39. /* Class-of-service bits */
  40. #define LOW_DELAY       0x10
  41. #define THROUGHPUT      0x08
  42. #define RELIABILITY     0x04
  43.  
  44. /* IP TOS fields */
  45. #define PREC(x)         (((x)>>5) & 0x7)
  46. #define DELAY           0x10
  47. #define THRUPUT         0x8
  48. #define RELIABLITY      0x4
  49.  
  50. /* Pseudo-header for TCP and UDP checksumming */
  51. struct pseudo_header {
  52.     int32 source;           /* IP source */
  53.     int32 dest;             /* IP destination */
  54.     char protocol;          /* Protocol */
  55.     int16 length;           /* Data field length */
  56. };
  57. #define NULLHEADER      (struct pseudo_header *)0
  58.  
  59. /* Format of a MIB entry for statistics gathering */
  60. struct mib_entry {
  61.     char *name;
  62.     struct {
  63.         int32 integer;
  64.     } value;
  65. };
  66.  
  67. #endif  /* _INTERNET_H */
  68.